home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / MISC.SWG / 0028_dBase II File Structure.pas < prev    next >
Pascal/Delphi Source File  |  1993-08-27  |  2KB  |  65 lines

  1.  HelpPC 2.0        PC Programmers Reference
  2.  Copyright (c) 1990 David Jurgens
  3.  
  4.                dBASE - File Header Structure (dBASE II)
  5.  
  6.  Offset Size          Description
  7.  
  8.    00   byte    dBASE version number 02h=dBASE II
  9.    01   word    number of data records in file
  10.    03   byte    month of last update
  11.    04   byte    day of last update
  12.    05   byte    year of last update
  13.    06   word    size of each data record
  14.    08 512bytes  field descriptors  (see below)
  15.   520   byte    0Dh if all 32 field descriptors used; otherwise 00h
  16.  
  17.  - dBASE II file header has a fixed size of 521 bytes
  18.  
  19.  
  20.               DBASE - File header structure (DBASE III)
  21.  
  22.  Offset Size           Description
  23.  
  24.    00   byte      dBASE vers num 03h=dBASE III w/o .DBT
  25.                   83h=dBASE III w .DBT
  26.    01   byte      year of last update
  27.    02   byte      month of last update
  28.    03   byte      day of last update
  29.    04   dword     long int number of data records in file
  30.    08   word      header structure length
  31.    10   word      data record length
  32.    12 20bytes     version 1.0 reserved data space
  33.  32-n 32bytes ea. field descriptors  (see below)
  34.   n+1   byte      0dH field terminator.
  35.  
  36.  
  37.  - unlike dBASE II, dBASE III has a variable length header
  38.  
  39.  
  40.                       dBASE - Field Descriptors
  41.  
  42.  dBASE II Field Descriptors (header contains 32 FDs)
  43.  
  44.  Offset Size              Description
  45.  
  46.    00  11bytes    null terminated field name string, 0Dh as first
  47.                   byte indicates end of FDs
  48.    11   byte      data type, Char/Num/Logical (C,N,L)
  49.    12   byte      field length
  50.    13   word      field data address, (set in memory)
  51.    15   byte      number of decimal places
  52.  
  53.  
  54.  dBASE III Field Descriptors (FD count varies):
  55.  
  56.  Offset Size           Description
  57.  
  58.    00  11bytes   null terminated field name string
  59.    11   byte     data type, Char/Num/Logical/Date/Memo
  60.    12   dword    long int field data address, (set in memory)
  61.    16   byte     field length
  62.    17   byte     number of decimal places
  63.    18  14bytes   version 1.00 reserved data area
  64.  
  65.